Convert Database
The iEnergy Suite Database Editor uses SQLite .db files for power-system simulation databases. Legacy iPool databases are stored in Microsoft Access format (.mdb or .accdb). The Convert Database tool converts these legacy files to the .db format used by the Database Editor.
Opening Convert Database
Click Convert Database in the top toolbar. This button is always enabled — you do not need to have a database open to run a conversion.
Conversion Modes
The modal offers three conversion modes, selected with radio buttons. The mode determines the input type and whether batch processing is available.
Single file
- Label (exact): "Single file"
- Available on: Desktop and Web
- Input: One
.mdbor.accdbfile. - Output: One
.dbfile.
This is the only mode available in the web version.
Multiple files (Whole folder)
- Label (exact): "Multiple files (Whole folder)"
- Available on: Desktop only
- Web display: Shown as a disabled note: "Multiple files (Whole folder) — Desktop app only"
- Input: A folder containing
.mdbor.accdbfiles. - Output: A folder of
.dbfiles (converted in batch).
Regional to Zonal
- Label (exact): "Regional to Zonal"
- Available on: Desktop only
- Web display: Shown as a non-interactive note: "Regional to Zonal — Desktop app only". No radio button is rendered for web users; the mode cannot be selected in the web build.
This mode restructures an existing regional SQLite database into a zonal-format database. Unlike the other two modes, it does not convert from Microsoft Access — the source is already a SQLite file and the output is a modified copy of that file.
Known limitations of this mode — read before converting.
- Desktop only. This mode is not available in the web build.
- No progress display. The modal shows no spinner or progress text while converting. The interface will appear frozen; this is expected. Wait for the success message.
- Cancel does not work. Clicking Cancel during conversion changes the button label but does not stop the operation. The conversion runs to completion regardless. Do not rely on Cancel as an abort mechanism for this mode.
- No schema check. The tool will attempt conversion on any SQLite file with the accepted extension. It does not verify that the source is a regional database. Ensure you are selecting the correct source file before proceeding.
Opening Regional to Zonal
- Click Convert Database in the top toolbar.
- In the Convert Database modal, select "Regional to Zonal".
The modal shows two sections: INPUT and OUTPUT.
Selecting the source file
Under INPUT, click "Choose…". A native file picker opens, filtered to .db, .sqlite, and .sqlite3 files. Select the regional database you want to convert.
The source database is chosen in the modal — it does not need to be open in the Database Editor. The source database is not modified. The conversion reads it read-only and writes all changes to a separate output file.
If the source file contains Sites with SiteIDs that are not recognised, conversion is refused before any output file is written. See Error messages below.
Setting the output path
Once you select an input file, the OUTPUT path is automatically populated with a derived filename: the letter Z is appended to the stem before the extension. For example:
SysWESM2606.db→SysWESM2606Z.dbSysWESM2606.sqlite→SysWESM2606Z.sqlite
To use a different path, click "Choose…" under OUTPUT to open the OS save dialog, or type a path directly into the output field. The output file must use a .db, .sqlite, or .sqlite3 extension.
If a file already exists at the output path, a confirmation dialog appears:
- Message: "Output file already exists."
- Detail: Overwrite
"<output path>"? - Confirm button: "Overwrite"
If you confirm, the existing file is overwritten. If you close the dialog without clicking Overwrite, no conversion runs.
Running the conversion
Click "Convert" (enabled when both input and output paths are set). The modal shows no progress during conversion. When conversion completes, the modal body displays:
Zonal database written to: <output path>
What changes in the output file
The following tables are modified in the output file. The source database is not touched.
| Table | Change |
|---|---|
| Regions | All original rows deleted and replaced with 14 fixed zonal rows (01NLUZ, 02METRO, 03SLUZ, 04LEYTE, 05CEBU, 06NEGROS, 07BOHOL, 08PANAY, 09NWMIN, 10LANAO, 11NCMIN, 12NEMIN, 13SEMIN, 14SWMIN). A regional source typically has 3 rows (CLUZ, CVIS, CMIN). |
| Links | All original rows deleted and replaced with 13 fixed zonal interconnection links. A regional source typically has 2 rows. |
| Sites | RegID and GroupID updated for every row to reflect the assigned zone. All other columns (Name, FType, Max, Cap, SRMC, etc.) are left untouched. |
| LinkCoef | All rows deleted (cleared). |
| Units | Not modified. |
Error messages
Errors appear in the red banner above the modal footer.
| Situation | Message |
|---|---|
| No input file selected | "Please select an input file." |
| Input file has wrong extension | "Input file must be a .db, .sqlite, or .sqlite3 file." |
| No output path set | "Please specify an output file path." |
| Output extension not accepted | "Output file must have a .db, .sqlite, or .sqlite3 extension." |
| Input and output paths are the same | "Input and output paths must be different." |
| Input file deleted after selection | "The selected input file no longer exists on disk." |
| Sites contain unrecognised SiteIDs | "regionalToZonal: N unrecognised non-prefixed site[s]: ID1, ID2, …and M more. Conversion refused — fix these SiteIDs before converting." |
When the SiteID error occurs, no output file is written. Fix the SiteIDs in the source database and try again.
After Conversion
Once conversion completes, use Open Database in the top toolbar to open the converted .db file and begin editing. From there, all standard Database Editor features are available: browsing the power-system hierarchy, editing records, saving changes, and running updates.